<!DOCTYPE html>
  <html xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:ui="http://java.sun.com/jsf/facelets"
        xmlns:f="http://java.sun.com/jsf/core">
   <h:head>
   </h:head>
	
	<h:body>

		<ui:include src="/pages/header.xhtml"/>
        <ui:include src="/pages/menu.xhtml"/>
 <h:form id="register">
			<p:growl id="growl" sticky="true" showDetail="true"/>  
  
		 <p:tab id="confirm" title="Confirmation">
		 
		 <p:panel header="Ajouter un sejour">

		        <h:messages errorClass="error"/>
		        <h:panelGrid columns="2">
		           <h:outputText value="Libelle: *" />
		           <h:inputText value="#{sejour.libelle}" required="true"/>
		           <h:outputText value="Description: *" />
		           <h:inputTextarea value="#{sejour.description}" required="true"/>
		           <h:outputText value="Prix: *" />
		           <p:selectOneMenu value="#{prix.id}">
			            <f:selectItem itemLabel="1000" itemValue="1" />  
			            <f:selectItem itemLabel="5000" itemValue="2" />
			        </p:selectOneMenu>
		           <h:outputText value="Periode" />
		           <p:selectOneMenu value="#{periode.id}">
			            <f:selectItem itemLabel="Printemps" itemValue="8" />  
			            <f:selectItem itemLabel="Ete" itemValue="9" />  
			            <f:selectItem itemLabel="Automne" itemValue="10" />
			            <f:selectItem itemLabel="Hiver" itemValue="11" />
			        </p:selectOneMenu>
			       <h:outputText value="Formule" />
		           <p:selectOneMenu value="#{formule.id}">
			            <f:selectItem itemLabel="Pension complete" itemValue="2" />  
			            <f:selectItem itemLabel="Demi pension" itemValue="3" />
			        </p:selectOneMenu>
			       <h:outputText value="Transport" />
		           <p:selectOneMenu value="#{transport.id}">
			            <f:selectItem itemLabel="Avion" itemValue="1" />  
			            <f:selectItem itemLabel="Train" itemValue="2" />
			            <f:selectItem itemLabel="Bateau" itemValue="3" />
			        </p:selectOneMenu>
		        </h:panelGrid> 
		        <p:commandButton value="Valider" actionListener="#{myService.ajouterSejour(sejour, periode, transport, formule, prix)}" />       
		      </p:panel>   
		        
		     </p:tab>
		</h:form>
	 <ui:include src="/pages/footer.xhtml"/>
		</h:body>
		</html>